/**
 * 项目配置文件
 * 一般配置项目的请求路径和服务器相关路径
 */
// let env = 'dev' // 本地环境
let env = "test"; // 测试环境
// let env = "pre"; // 预发布环境
// let env = 'prod' // 生产环境

const baseConfig = {
  server: "http://172.16.0.74:8088", // 小程序线上服务端地址
  photoServer: "", // 图片服务器前缀
  staticServer:
    "https://psy-public.obs.myhuaweicloud.com/bpai/static/bpai-wxapp", // 静态服务器前缀
  webUrl: "https://bpai-h5-test.biaopu.cloud",
  pcLink: "http://172.16.0.74:8090",
};

const configs = {
  dev: {
    ...baseConfig,
    server: "http://172.16.0.73:8088",
    webUrl: "https://bpai-h5-test.biaopu.cloud",
    pcLink: "http://172.16.0.74:8090",
  },
  test: {
    ...baseConfig,
    server: "https://bpai-h5-test.biaopu.cloud/api/eimsWebApi",
    // server: "http://172.16.0.74:8088",
    webUrl: "https://bpai-h5-test.biaopu.cloud",
    env: "test",
    pcLink: "http://172.16.0.74:8090",
  },
  pre: {
    ...baseConfig,
    server: "https://bpai-h5-pre.biaopu.cloud/api/eimsWebApi",
    webUrl: "https://bpai-h5-pre.biaopu.cloud",
    env: "pre",
    pcLink: "https://bpaiweb.biaopu.cloud/chat",
  },

  prod: {
    ...baseConfig,
    server: "https://bpai-h5.biaopu.cloud/api/eimsWebApi",
    webUrl: "https://bpai-h5.biaopu.cloud",
    env: "prod",
    pcLink: "https://bpaiweb.biaopu.cloud/chat",
  },
};

const config = configs[env];

module.exports = {
  config,
};
